home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Embed / Include / EmbedPar.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  3.0 KB  |  105 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                EmbedPar.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Author:                M.Boetcher
  7. //
  8. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef EMBEDPART_H
  13. #define EMBEDPART_H
  14.  
  15. // ----- Framework Includes -----
  16.  
  17. #ifndef FWPARTNG_H
  18. #include "FWPartng.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. // Forward class declaration
  23. //========================================================================================
  24.  
  25. #if FW_LIB_EXPORT_PRAGMAS
  26. #pragma import on
  27. #endif
  28. class FW_CLASS_ATTR FW_CPresentation;
  29. #if FW_LIB_EXPORT_PRAGMAS
  30. #pragma import off
  31. #endif
  32.  
  33. class FW_CLASS_ATTR CEmbedFrame;
  34. class FW_CLASS_ATTR CEmbedProxy;
  35. class FW_CLASS_ATTR CEmbedSelection;
  36.  
  37. //========================================================================================
  38. //    CLASS CEmbedPart
  39. //========================================================================================
  40.  
  41. class FW_CLASS_ATTR CEmbedPart : public FW_CEmbeddingPart
  42. {
  43. //----------------------------------------------------------------------------------------
  44. //    Initialization/Destruction
  45. //
  46.   public:
  47.     CEmbedPart(ODPart* odPart);
  48.     virtual void Initialize(Environment* ev);
  49.     
  50.     virtual ~CEmbedPart();
  51.     
  52. //----------------------------------------------------------------------------------------
  53. //    Inherited API
  54. //
  55.   public:
  56.     virtual FW_CFrame* NewFrame(Environment* ev,
  57.                                 ODFrame* odFrame, 
  58.                                 FW_CPresentation* presentation,
  59.                                 FW_Boolean fromStorage);
  60.  
  61.     virtual void ExternalizeContent(Environment* ev, ODStorageUnit* storageUnit, FW_CCloneInfo* cloneInfo);
  62.     virtual void InternalizeContent(Environment *ev, ODStorageUnit* storageUnit, FW_CCloneInfo* cloneInfo);
  63.  
  64. //----------------------------------------------------------------------------------------
  65. //    New API
  66. //
  67.   public:
  68.     CEmbedProxy*                 GetProxy(Environment* ev) const;
  69.     void                         SetProxy(Environment* ev, CEmbedProxy* proxy);
  70.  
  71.     FW_CPresentation*             GetMainPresentation(Environment* ev) const;
  72.  
  73. //----------------------------------------------------------------------------------------
  74. //    Data Members
  75. //
  76.   public:
  77.     static const ODValueType kPartKind;
  78.     static const ODValueType kPartUserName;
  79.  
  80.   private:
  81.     CEmbedSelection*    fSelection;
  82.     FW_CPresentation*    fPresentation;
  83.     CEmbedProxy*        fProxy;
  84. };
  85.  
  86. //========================================================================================
  87. //    CEmbedPart Inlines
  88. //========================================================================================
  89.  
  90. inline FW_CPresentation* CEmbedPart::GetMainPresentation(Environment* ev) const
  91. {
  92.     return fPresentation;
  93. }
  94.  
  95. //----------------------------------------------------------------------------------------
  96. //    CEmbedPart::GetProxy
  97. //----------------------------------------------------------------------------------------
  98.  
  99. inline CEmbedProxy* CEmbedPart::GetProxy(Environment* ev) const
  100. {
  101.     return fProxy;
  102. }
  103.  
  104. #endif
  105.